# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libopensles-standalone
pkgver=0_git20240221
pkgrel=0
_commit="605a83f47263a022427afb6e95801bd39b459b78"
pkgdesc="A lightly patched version of Google's libOpenSLES implementation"
url="https://gitlab.com/android_translation_layer/libopensles-standalone"
arch="x86_64 aarch64 armv7"
license="Apache-2.0"
makedepends="
	libsndfile-dev
	meson
	openjdk8-jdk
	sdl2-dev
	"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://gitlab.com/android_translation_layer/libopensles-standalone/-/archive/$_commit/libopensles-standalone-$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/libopensles-standalone-$_commit"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
327d458f243ff4aeb058c60b70454d74995c86168f8290b1902d6c6d4cfc7624bc356dad69e6b556ee77edf96a528ce0de29749a580432e519fea23e4378c733  libopensles-standalone-605a83f47263a022427afb6e95801bd39b459b78.tar.gz
"
